import request from '@/utils/request'

// 查询股票基础信息列表
export function listInfo(query) {
    return request({
        url: '/stock/info/list',
        method: 'get',
        params: query
    })
}

// 查询股票基础信息详细
export function getInfo(stockCode) {
    return request({
        url: '/stock/info/' + stockCode,
        method: 'get'
    })
}

// 全量同步股票信息
export function syncFull() {
    return request({
        url: '/stock/info/sync/full',
        method: 'post'
    })
}

export function syncIncremental() {
    return request({
        url: '/stock/info/sync/incremental',
        method: 'post'
    })
}

// 检查股票代码是否存在
export function checkStockExists(stockCode) {
    return request({
        url: '/stock/info/check/' + stockCode,
        method: 'get'
    })
}

export function getStockTick(query) {
    return request({
        url: '/stock/info/stock_tick',
        method: 'post',
        params: query
    })
}